/**
 * Project Name:youba
 * Package Name:com.inoneone.youba.mcht.conf
 * Date:2017/7/19下午6:43
 * Copyright (c) 2017, www.zbj.com All Rights Reserved
 */
package com.inoneone.youba.mcht.conf;

import com.inoneone.toolkit.SnowFlake;
import com.inoneone.youba.mcht.dao.mapper.CardFuelStatisticsMapper;
import com.inoneone.youba.mcht.dao.mapper.ExtendOrderMapper;
import com.inoneone.youba.mcht.util.DateUtil;
import me.hao0.wechat.core.Wechat;
import me.hao0.wechat.core.WechatBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;
import sun.awt.SunHints;

import java.util.Calendar;
import java.util.Date;

/**
 * Description: (描述) </br>
 * Date: 2017/7/19下午6:43 </br>
 *
 * @author 姬远玄
 * @since JDK 1.7
 */

@Configuration
public class CommonConfig {
    @Autowired
    ValueConfig valueConfig;

    @Bean
    public SnowFlake getSnowFlake()
    {
        return new SnowFlake(1, 1);
    }

    @Bean
    public Wechat getWechat()
    {
        return WechatBuilder.newBuilder(valueConfig.getAppId(), valueConfig.getAppSecret()).build();
    }
}
